#include<bits/stdc++.h>
#define rnd() abs((int)_rnd())
using namespace std;
inline int read(){
	int x=0;bool f=0;char ch=getchar();
	while(ch<'0'||ch>'9')f^=(ch=='-'),ch=getchar();
	while('0'<=ch&&ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
const int V=1e9;
mt19937 _rnd(time(0));
int main(){
	freopen("sub.in","w",stdout);
	int n=5e5,k=3;
	printf("%d %d\n",n,k);
	for(int i=1;i<=n;i++)printf("%d ",rnd()%V+1);
	return 0;
}

